import Request from "@/utils/request.js";

export function getList(params){
    return Request({
        url: "api/house/list",
        method: "post",
        headers: {
            'Content-Type':'application/json;charset=UTF-8',
        },
        data: params
    })
}

export function remove(params){
    return Request({
        url: "api/house/batch",
        method: "delete",
        headers: {
            'Content-Type':'application/json;charset=UTF-8',
        },
        data: params
    })
}

export function update(params){
    return Request({
        url: 'api/house',
        method: 'put',
        headers: {
            'Content-Type':'application/json;charset=UTF-8',
        },
        data: params
    })
}

export function exportExcel(){
    window.location.href = '/api/house/excel'
}

export function downloadExcelTemplate(){
    window.location.href = '/api/house/excelTemplate'
}
